package net.kingborn.erp.wc.command;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.kingborn.core.command.BaseCommand;
import net.kingborn.core.command.Command;
import net.kingborn.core.command.Param;
import net.kingborn.erp.wc.model.Attendance;
import net.kingborn.erp.wc.service.AttendanceService;
import org.springframework.beans.factory.annotation.Autowired;

@Command
public class AttendanceQuery extends BaseCommand {


    @Param(required = true)
    long current;

    @Param(required = true)
    long size;

    @Param(required = true)
    JSONObject obj;

    @Autowired
    AttendanceService attendanceService;

    @Override
    protected void init() throws Exception {

    }

    @Override
    protected void doCommand() throws Exception {
        System.out.println(obj);
        Page<Attendance> page = attendanceService.pageSearch(current, size, obj);
        data.put("page", page);

    }
}
